<!--pages/more/index.html-->
<section class="upload">

  <tabBar route tabBarPosition="bottom" @onChange="changeBack">
    <tabBarItem title="首页" :icon="info" :selectedIcon="info_active" link="/pages/info/index">
    </tabBarItem>
    <tabBarItem selected title="上传" :icon="up" :selectedIcon="up_active" link="/pages/upload/index">
      <div class="upload_nav_title flex justify-between">
        <span>上传到{{diskName}}</span>
      </div>
      <div class="upload_title">
        选择天翼云盘上的文件上传到{{diskName}},单次选择的文件或是文件夹上传完成后,本次上传即结束。
      </div>

      

      <div class="upload_path">
        <span>上传到{{diskName}}的位置: {{diskPath}}</span>
        <ok-button :btnStyle="btnDiskPath" class="btnDiskPath" @click="selectedDiskPath">选择</ok-button>
      </div>
      <div class="mg-tp-16 upload_btn">
        <ok-button :btnStyle="btnStyle" class="btnStyle" @click="selectedFileByTianYiDisk">选择文件上传</ok-button>
      </div>

    </tabBarItem>
    <tabBarItem title="传输" :icon="down" :selectedIcon="down_active" link="/pages/download/index">

    </tabBarItem>
    <tabBarItem title="我的" :icon="user" :selectedIcon="user_active" link="/pages/my/index">
    </tabBarItem>
  </tabBar>

  <ActionSheet type="custom" :visible.sync="showDiskPathDialog" id="customPathSelected" >
    <div slot="customContent" class="sortList" v-loading="loading">
      <div class="sortList_title">
        上传到{{diskName}}
      </div>
      <div class="wrap">
        <div class="sortList_breadcrumbs">
          <span  @click="backPath" class="icon-a-bianzu25 iconfont"></span>
          <Breadcrumbs devideIcon="/" :pathes="pathes" @pathClick="pathClick" />
        </div>
        <div class="content_list">
          <div class="custom-order ok-selectlist">
            <div v-for="item in diskFolderList" :key="item.id" class="ok-selectlist-item" @click="clickFolder(item)">
              <div class="ok-selectlist-thumb">
                <imgItem :isDir="true" class="mg-rg-10"></imgItem>
              </div>
              <div class="ok-selectlist-content">
                <div class="ok-selectlist-content-title">
                  <div class="ok-selectlist-title width-60">{{item.name}}</div>
                  <div class="ok-selectlist-subtitle">{{item.time}}</div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="content_btn">
          <ok-button :btnStyle="btnStyle" style="width:100%;height: 36px;line-height: 36px;" class="btnStyle" @click="confirmPath">确定</ok-button>
        </div>
      </div>
      
    </div>
  </ActionSheet> 


  <ActionSheet type="custom" :visible.sync="showfileDialog" id="customPathSelected" >
    <div slot="customContent" class="sortList" v-loading="loading">
      <div class="sortList_title">
        选择{{tiYiSelectedListLength? tiYiSelectedListLength+'个':''}}文件
      </div>
      <div class="wrap">
        <div class="sortList_breadcrumbs">
          <span  @click="backFilePath" class="icon-a-bianzu25 iconfont"></span>
          <Breadcrumbs devideIcon="/" :pathes="folderPathes" @pathClick="tiYiPathClick" />
        </div>
        <div class="content_list">
          <div class="custom-order ok-selectlist">
            <div v-for="item in tiYiList" :key="item.id" class="ok-selectlist-item" :class="{'active':item.checkValue}">
              <div class="ok-selectlist-icon">
                <label class="ok-checkbox-wrapper">
                  <ok-checkbox :checked="item.checkValue" @onChange="(val)=>{checkChangeValue(val,item)} " />
                </label>
              </div>
              <div @click="tiYiFolderClick(item)" class="ok-selectlist-thumb"><imgItem :fileName="item.name" :isDir="!item.fileType" /></div>
              <div @click="tiYiFolderClick(item)" class="ok-selectlist-content">
                <div class="ok-selectlist-content-title">
                  <div class="ok-selectlist-title">{{item.name}}</div>
                  <div class="ok-selectlist-subtitle">{{item.time}}</div>
                </div>
              </div>
              <div v-if="!item.fileType" class="ok-selectlist-extra">
                <div>
                  <Icon type="right"></Icon>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="content_btn">
          <ok-button :btnStyle="btnStyle" :disabled="tiYiSelectedList.length===0" style="width:100%;height: 36px;line-height: 36px;" class="btnStyle" @click="confirmFile">确定</ok-button>
        </div>
      </div>
      
    </div>
  </ActionSheet> 
</section>